package MCQReaderModel;

import javax.swing.tree.DefaultMutableTreeNode;

public class PageNode extends DefaultMutableTreeNode {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private int numPage;
	private DefaultMutableTreeNode radioNode;
	private DefaultMutableTreeNode caseNode;
	private DefaultMutableTreeNode textNode;
	private DefaultMutableTreeNode codeNode;

	public PageNode() {
		this(0);
	}
	
	public PageNode(int numPage) {
		this.numPage = numPage;
		radioNode = new DefaultMutableTreeNode("Radio");
		caseNode = new DefaultMutableTreeNode("Case");
		textNode = new DefaultMutableTreeNode("Text area");
		codeNode = new DefaultMutableTreeNode("Bar code");
		add(codeNode);
		add(radioNode);
		add(caseNode);
		add(textNode);
	}

	public DefaultMutableTreeNode getRadioNode() {
		return radioNode;
	}

	public DefaultMutableTreeNode getCaseNode() {
		return caseNode;
	}

	public DefaultMutableTreeNode getTextNode() {
		return textNode;
	}

	public DefaultMutableTreeNode getCodeNode() {
		return codeNode;
	}

	public int getNumPage() {
		return numPage;
	}
	
	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public void setNumPage(int numPage) {
		this.numPage = numPage;
	}

	public void setRadioNode(DefaultMutableTreeNode radioNode) {
		this.radioNode = radioNode;
	}

	public void setCaseNode(DefaultMutableTreeNode caseNode) {
		this.caseNode = caseNode;
	}

	public void setTextNode(DefaultMutableTreeNode textNode) {
		this.textNode = textNode;
	}

	public void setCodeNode(DefaultMutableTreeNode codeNode) {
		this.codeNode = codeNode;
	}

	public String toString(){
		return "Page " + numPage;
	}
}
